home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mlib / include / mmouse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-27  |  1.2 KB  |  43 lines

  1.  
  2. #ifndef __MMOUSE_H
  3. #define __MMOUSE_H
  4.  
  5. #define MMOUSE_ID            0x0115
  6.  
  7. #define DEFAULT_MOUSE_REP_DELAY   25   // Interval between click signals
  8.  
  9. typedef enum {
  10.     noButtons    = 0x00,
  11.     leftButton   = 0x01,
  12.     rightButton  = 0x02,
  13.     reset        = 0xff,
  14.     eitherButton = 0x03
  15. } buttonType;
  16.  
  17. class MMouse : public MMob {
  18. protected:
  19.     BYTE                     nbutton;
  20.     BYTE                     obutton;
  21. public:
  22.     DWORD                    RepeatDelay;
  23. protected:
  24.     void                     DefaultCursor (void);
  25. public:
  26.                  MMouse (void);
  27.     void                     MoveTo (int x,int y);
  28.     buttonType               buttonStatus (void);
  29.     void                     Update (void);
  30.     virtual inline classType isA (void) {return (MMOUSE_ID);};
  31.     inline void              SetRepeatDelay (DWORD NewDelay) { RepeatDelay = NewDelay;};
  32.     BOOL                     isPressed (buttonType myButtons);
  33.     BOOL                     isClicked (buttonType myButtons);
  34.     BOOL                     isInBox (int x1, int y1, int x2, int y2);
  35.     BOOL                     isInBox (const RECT& ABox);
  36.                 ~MMouse (void);
  37. };
  38.  
  39. #ifndef MOUSE_UNIT
  40. extern MMouse mouse;
  41. #endif
  42. #endif
  43.